<template>
         <!-- 1.0使用mint-ui实现首页轮播 -->
           <div>
             <mt-swipe :auto="2000">
                <mt-swipe-item v-for="item in imgs" :key="item.id">
                    <img :src="item.img" alt="">
                </mt-swipe-item>
            </mt-swipe>
           </div>
 
</template>

<script>
export default { 
  data(){
      return {
          id:0,      //商品id
      }
  },
  props:['imgs'],    //用来接收父组件传过来的数据
  created(){
      this.id = this.$route.params.id;
  }
}
</script>

<style scoped>
.mint-swipe {
  height: 300px;
}
.mint-swipe-item {
  background-color: red;
  width: 100%;
  /* height: 300px; */
}
.mint-swipe-item img {
  width: 100%;
}
</style>


